from django.contrib import admin
from tongooAdmin.programas.models import *



class NotesInline(admin.TabularInline):
    model = Nota
    extra = 1



class TongooAdmin(admin.ModelAdmin):
    list_display = ('season', 'episodio', 'nombre', 'lugar', 'emision')
    inlines = [NotesInline]



class NotaAdmin(admin.ModelAdmin):
    list_display = ('fecha', 'image','puntaje', 'tongoo')#se saco 'desc' que estaba como 2do argumento
    raw_id_fields = ('tongoo',)
    filter_horizontal = ('links','tags','categs')
    list_filter = ['puntaje','fecha']
    search_fields = ['puntaje']



class TagAdmin(admin.ModelAdmin):
    #list_display = ('tag')
    pass



class CategoriaAdmin(admin.ModelAdmin):
    #list_display = ('categ',)
    pass



class LinkAdmin(admin.ModelAdmin):
    #list_display = ('url', 'title', 'desc', 'mark')
    pass



class UsuarioAdmin(admin.ModelAdmin):
    pass



admin.site.register(Tongoo, TongooAdmin)
admin.site.register(Nota, NotaAdmin)
admin.site.register(Tag, TagAdmin)
admin.site.register(Categoria, CategoriaAdmin)
admin.site.register(Link, LinkAdmin)
#admin.site.register(Usuario, UsuarioAdmin)
